//
//  Scenic.m
//  ImGuider
//
//  Created by llt on 2017/4/12.
//  Copyright © 2017年 imguider. All rights reserved.
//

#import "Scenic.h"

@implementation Scenic

+ (NSDictionary *)modelCustomPropertyMapper {
    
    return @{@"ID" : @"id"};
}

+ (NSDictionary *)modelContainerPropertyGenericClass {
    
    return @{@"lines" : [LineModel class],@"linklines":[LineModel class]};
}

- (NSNumber *)distance {
    
    CGFloat dis = [IGUtils getDistanceFromCoordinate:[LocationManager sharedManager].currentLocation.coordinate toCoordinate:CLLocationCoordinate2DMake(self.lat.floatValue, self.lng.floatValue)];
    
    return @(dis);
}

- (NSArray *)pictureArray {
    
    return [self.pictures componentsSeparatedByString:@","];
}

- (NSArray *)thumbsArray {
    
    return [self.thumbs componentsSeparatedByString:@","];
}

- (NSNumber *)rank {
    
    if (!_rank) {
        _rank = @(10086);
    }
    
    return _rank;
}

@end
